import 'package:amway_superapp_creator_plugin/models/haowu_product_models.dart';
import 'package:json_annotation/json_annotation.dart';

part 'shop_list_model.g.dart';

@JsonSerializable()
class ShopListBean {
  List<HaowuProduct> content;
  int totalElements;
  int totalPages;
  int size;
  int number;
  int numberOfElements;
  int nextPageNumber;

  ShopListBean(
      {this.content,
      this.totalElements,
      this.totalPages,
      this.size,
      this.number,
      this.numberOfElements,
      this.nextPageNumber});

  factory ShopListBean.fromJson(Map<String, dynamic> json) =>
      _$ShopListBeanFromJson(json);

  Map<String, dynamic> toJson() => _$ShopListBeanToJson(this);
}

// @JsonSerializable()
// class ContentBean {
//   String productCode;
//   String skuName;
//   String productName = "";
//   String picture = "";
//   PriceDataBean priceData = PriceDataBean();
//   String pdpVideoUrl;
//   int number;
//   bool isChecked = false;
//   List<String> tagList;
//
//   ContentBean(
//       {this.productCode,
//       this.skuName,
//       this.isChecked = false,
//       this.number = 0,
//       this.productName = "",
//       this.picture = "",
//       this.priceData,
//       this.pdpVideoUrl,
//       this.tagList});
//
//   factory ContentBean.fromJson(Map<String, dynamic> json) =>
//       _$ContentBeanFromJson(json);
//
//   Map<String, dynamic> toJson() => _$ContentBeanToJson(this);
//
//   HaowuProduct toHaowuProduct() => _$ContentBeanToHaowuProduct(this);
// }

class CategoryPathBean {
  String code;
  String name;
  String icon;

  CategoryPathBean({this.code, this.name, this.icon});

  factory CategoryPathBean.fromJson(Map<String, dynamic> json) =>
      _$CategoryPathBeanFromJson(json);

  Map<String, dynamic> toJson() => _$CategoryPathBeanToJson(this);
}

@JsonSerializable()
class PriceDataBean {
  String skuCode = "";
  double price = 0.0;
  String currency;
  String saleStatus;

  PriceDataBean(
      {this.skuCode = "", this.price, this.currency, this.saleStatus});

  factory PriceDataBean.fromJson(Map<String, dynamic> json) =>
      _$PriceDataBeanFromJson(json);

  Map<String, dynamic> toJson() => _$PriceDataBeanToJson(this);
}
